package cn.edu.cug.cs.gtl.oi.ui.menu;

import javax.swing.*;
import java.awt.event.KeyEvent;

public class JMenuSystem extends JMenu {
    JMenuItem ItemSystemOption = new JMenuItem("系统选项");
    JMenuItem ItemCoordinateGridSetting = new JMenuItem("坐标网格设置");
    JMenuItem ItemMenuFontSetting = new JMenuItem("菜单字体设置");
    JMenuItem ItemNew3DView = new JMenuItem("新建三维视图");
    JMenuItem ItemStackWindow = new JMenuItem("层叠窗口");
    JMenuItem ItemTileWindow = new JMenuItem("平铺窗口");
    JCheckBoxMenuItem ItemStatusBar = new JCheckBoxMenuItem("状态栏");
    JMenu MenuToolbarAndDockWindow = new JMenu("工具栏和停靠窗口");
    JCheckBoxMenuItem ItemStandard = new JCheckBoxMenuItem("标准");
    JCheckBoxMenuItem ItemGraphicEdit = new JCheckBoxMenuItem("图形编辑");
    JCheckBoxMenuItem ItemCommonUseTool = new JCheckBoxMenuItem("常用工具");
    JCheckBoxMenuItem ItemProjectView = new JCheckBoxMenuItem("工程视图");
    JCheckBoxMenuItem ItemModelView = new JCheckBoxMenuItem("模型视图");
    JCheckBoxMenuItem ItemSceneLocateView = new JCheckBoxMenuItem("场景定位视图");
    JCheckBoxMenuItem ItemElementProp = new JCheckBoxMenuItem("图元属性");
    JMenuItem ItemCustom = new JMenuItem("自定义");
    JMenu MenuAppAppearance = new JMenu("应用程序外观");
    JRadioButtonMenuItem ItemWindows2000 = new JRadioButtonMenuItem("Windows 2000");
    JRadioButtonMenuItem ItemWindowsOfficeXP = new JRadioButtonMenuItem("Windows XP");
    JRadioButtonMenuItem ItemWindowsXP = new JRadioButtonMenuItem("Windows XP");
    JRadioButtonMenuItem ItemOffice2003 = new JRadioButtonMenuItem("Office 2003");
    JRadioButtonMenuItem ItemVisualStudio2005 = new JRadioButtonMenuItem("Visual Studio 2005");
    JRadioButtonMenuItem ItemVisualStudio2008 = new JRadioButtonMenuItem("Visual Studio 2008");
    JMenu MenuOffice2007 = new JMenu("Office 2007");
    JRadioButtonMenuItem ItemBlue = new JRadioButtonMenuItem("Blue Style");
    JRadioButtonMenuItem ItemBlack = new JRadioButtonMenuItem("Black Style");
    JRadioButtonMenuItem ItemSilver = new JRadioButtonMenuItem("Silver Style");
    JRadioButtonMenuItem ItemAqua = new JRadioButtonMenuItem("Aqua Style");
    JMenuItem ItemWindows = new JMenuItem("Windows...");

    public JMenuSystem() {
        this.setText("系统(W)");
        this.setMnemonic(KeyEvent.VK_W);
        init();
    }

    void init() {
        this.add(ItemSystemOption);

        this.add(ItemCoordinateGridSetting);

        this.add(ItemMenuFontSetting);
        this.addSeparator();

        this.add(ItemNew3DView);
        this.addSeparator();

        this.add(ItemStackWindow);

        this.add(ItemTileWindow);
        this.addSeparator();

        ItemStatusBar.setState(true);
        this.add(ItemStatusBar);
        this.addSeparator();

        ItemStandard.setState(true);
        MenuToolbarAndDockWindow.add(ItemStandard);

        ItemGraphicEdit.setState(true);
        MenuToolbarAndDockWindow.add(ItemGraphicEdit);

        ItemCommonUseTool.setState(true);
        MenuToolbarAndDockWindow.add(ItemCommonUseTool);
        MenuToolbarAndDockWindow.addSeparator();

        ItemProjectView.setState(true);
        MenuToolbarAndDockWindow.add(ItemProjectView);

        ItemModelView.setState(true);
        MenuToolbarAndDockWindow.add(ItemModelView);

        ItemSceneLocateView.setState(true);
        MenuToolbarAndDockWindow.add(ItemSceneLocateView);

        ItemElementProp.setState(true);
        MenuToolbarAndDockWindow.add(ItemElementProp);
        MenuToolbarAndDockWindow.addSeparator();

        MenuToolbarAndDockWindow.add(ItemCustom);

        this.add(MenuToolbarAndDockWindow);

        MenuAppAppearance.add(ItemWindows2000);

        MenuAppAppearance.add(ItemWindowsOfficeXP);

        MenuAppAppearance.add(ItemWindowsXP);

        MenuAppAppearance.add(ItemOffice2003);

        MenuAppAppearance.add(ItemVisualStudio2005);

        MenuAppAppearance.add(ItemVisualStudio2008);

        MenuOffice2007.add(ItemBlue);

        MenuOffice2007.add(ItemBlack);

        MenuOffice2007.add(ItemSilver);

        MenuOffice2007.add(ItemAqua);

        MenuAppAppearance.add(MenuOffice2007);

        this.add(MenuAppAppearance);
        this.addSeparator();

        this.add(ItemWindows);
    }
}
